package com.infra.micro.id.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.infra.common.resp.PrintFriendliness;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel(value = "IdSegmentVO", description = "ID号段视图对象")
public class IdSegmentVO extends PrintFriendliness {
    @ApiModelProperty(name = "segmentId", value = "Id号段主键id", required = true)
    private Long segmentId;

    @ApiModelProperty(name = "appId", value = "业务应用唯一标识ID", required = true)
    private Integer appId;

    @ApiModelProperty(name = "startId", value = "开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同", required = true)
    private Long startId;

    @ApiModelProperty(name = "maxId", value = "当前最大id", required = true)
    private Long maxId;

    @ApiModelProperty(name = "step", value = "步长", required = true)
    private Integer step;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "createTime", value = "记录创建时间")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "updateTime", value = "记录更新时间")
    private Date updateTime;

    public Long getSegmentId() {
        return segmentId;
    }

    public void setSegmentId(Long segmentId) {
        this.segmentId = segmentId;
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public Long getStartId() {
        return startId;
    }

    public void setStartId(Long startId) {
        this.startId = startId;
    }

    public Long getMaxId() {
        return maxId;
    }

    public void setMaxId(Long maxId) {
        this.maxId = maxId;
    }

    public Integer getStep() {
        return step;
    }

    public void setStep(Integer step) {
        this.step = step;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
